notebook: Fix a misplaced tab label
authorMatthias Clasen <mclasen@redhat.com>
Mon, 15 Feb 2016 15:38:13 +0000 (10:38 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 15 Feb 2016 15:38:13 +0000 (10:38 -0500)
Sometimes default tab labels ("Page <n>") get created on-demand,
and in that case, we were forgetting to put them below the tab
node in the CSS node tree. The visible result of this is that the
heuristics for when to give notebooks background in Adwaita fail
in some cases. So, make sure to always place the label below the
tab node.

gtk/gtknotebook.c

index 6f9fafce5608608ad44de4f6d173940720cc765c..6c12dae7799bd316b78b135e3d8a5090d537924e 100644 (file)
@@ -5078,6 +5078,8 @@ gtk_notebook_update_labels (GtkNotebook *notebook)
               if (!page->tab_label)
                 {
                   page->tab_label = gtk_label_new (string);
+                  gtk_css_node_set_parent (gtk_widget_get_css_node (page->tab_label),
+                                           gtk_css_gadget_get_node (page->gadget));
                   gtk_widget_set_parent (page->tab_label,
                                          GTK_WIDGET (notebook));
                 }